package com.zzb.framework.init;

import com.zzb.framework.common.Base;
import com.zzb.framework.dict.service.DictAutoGeneratorComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 自启项
 * Created by zhangzhenbin on 17-8-3.
 */
@Component
@Order(value = 1)
public class RtdpWebStartupRunnerInit extends Base implements CommandLineRunner {
    @Autowired
    private DictAutoGeneratorComponent dictAutoGeneratorComponent;

    @Override
    public void run(String... args) throws Exception {
        logger.info("in web app init");
        //自动初始化数据字典表
        dictAutoGeneratorComponent.autoUpdate();
        //设置为已启动程序
        IsInitConstants.init.set(true);
    }
}
